<template>
  <div class="box">
    <div class="shark-wrap">
      <img
        src="https://imgservices-1252317822.image.myqcloud.com/coco/b11272023/ececa9a5.7y0amw.jpg"
      />
    </div>
  </div>
</template>

<script>
export default {};
</script>
<style lang="scss" scoped>
.box {
  .shark-wrap {
    // flex-shrink: 0;
    width: 800px;
    height: 480px;
    border-radius: 20px;
    background-color: #ffe8a3;
    img {
      display: block;
      width: 100%;
    }
    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  .shark-wrap:hover::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0.7),
      rgba(255, 255, 255, 0) 60%
    );
    animation: shark-wrap 2s infinite;
    transform: translateX(-100%);
  }

  @keyframes shark-wrap {
    to {
      transform: translateX(100%);
    }
  }
}
</style>
